<template>
  <div>

    <div class="basics">
      <el-row :gutter="24">
        <div>
          <div style="font-weight: bold;float: left;line-height: 32px;font-size: 22px;margin-right: 30px">基本信息</div>
          <div style="line-height: 32px;font-size: 16px"><i :class="entUserForm.verifyFlag | statusFilter" :style="entUserForm.verifyFlag | statusColor">{{ entUserForm.verifyFlag | statusFormat }} <span v-if="entUserForm.verifyFlag === '2'">{{entUserForm.verifyRemark}}</span></i>
            <span v-if="entUserForm.verifyFlag === '1'" style="font-size: 12px;color: #f0bb00;margin-left: 15px"><i class="el-icon-warning-outline" style="margin-right: 5px;"></i>编辑企业信息后，需重新审核</span>
            <router-link :to="{path:'/enterpriseSave'}">
              <div style="float: right">
                <div class="resumes_btns">
                  <button class="ent_button">编辑企业信息</button>
                </div>
              </div>
            </router-link>
          </div>
        </div>
      </el-row>
      <el-row :gutter="24">
        <div class="entbasics">
          <el-col :span="8">
            <span>公司名称： <span class="entbasicstext">{{ entUserForm.enterpriseName }}</span></span>
          </el-col>
          <el-col :span="8">
            <span>企业法人： <span class="entbasicstext">{{ entUserForm.legalRepresentative }}</span></span>
          </el-col>
          <el-col :span="8">
            <span>招聘联系人： <span class="entbasicstext">{{ entUserForm.enterpriseContacts }}</span></span>
          </el-col>
        </div>
        <div class="entbasics">
          <el-col :span="8">
            <span>联系电话： <span class="entbasicstext">{{ entUserForm.enterpriseTel }}</span></span>
          </el-col>
          <el-col :span="8">
            <span>电子邮箱： <span class="entbasicstext">{{ entUserForm.enterpriseMail }}</span></span>
          </el-col>
          <el-col :span="8">
            <span>公司性质： <span class="entbasicstext">{{ entUserForm.enterpriseNatureName }}</span></span>
          </el-col>
        </div>
        <div class="entbasics">
          <el-col :span="24">
            <span>行业： <span class="entbasicstext">{{ entUserForm.industryName }} 丨 {{ entUserForm.industrySubName }}</span></span>
          </el-col>
          <el-col :span="24">
            <span>省市区： <span class="entbasicstext">{{ entUserForm.provName }} 丨 {{ entUserForm.cityName }} 丨 {{ entUserForm.distName }}</span></span>
          </el-col>
          <el-col :span="24">
            <span>公司所在地址： <span class="entbasicstext">{{ entUserForm.enterpriseAddress }}</span></span>
          </el-col>
        </div>
      </el-row>
    </div>

    <div class="pass">
      <hr align=center width=100% color=#f0f0f0 SIZE=2/>
      <div>
        <div style="font-weight: bold;float: left">账号密码</div>
      </div>
      <el-row :gutter="24" style="float: left;margin-top: 30px;width: 800px">
        <el-col :span="3"><div class="grid-content bg-purple">
          <div class="user_icon"> <i class="el-icon-lock" /></div>
        </div></el-col>
        <el-col :span="15"><div class="grid-content bg-purple">
          <div class="listAgeTele">
            <p style="font-weight: bold">账号密码</p>
            <p style="color: #aaaaaa">*******</p>
            <p style="color: #aaaaaa">互联网帐号存在被盗号风险，建议您定期更改密码以确保账户安全</p>
          </div>
        </div></el-col>
        <el-col :span="6"><div class="grid-content bg-purple">
          <router-link :to="{path:'/entUpdatePassword',query:{id:id}}">
            <el-button class="user_button">修改密码</el-button>
          </router-link>
        </div></el-col>
      </el-row>
    </div>
    <!--    <div class="pass">-->
    <!--      <div>-->
    <!--        <div style="font-weight: bold;float: left">手机号码</div>-->
    <!--      </div>-->
    <!--      <el-row :gutter="24" style="float: left;margin-top: 30px;width: 800px">-->
    <!--        <el-col :span="3"><div class="grid-content bg-purple">-->
    <!--          <div class="user_icon"  style="color: #92e28b"><i class="el-icon-mobile-phone" /></div>-->
    <!--        </div></el-col>-->
    <!--        <el-col :span="15"><div class="grid-content bg-purple">-->
    <!--          <div class="listAgeTele">-->
    <!--            <p style="font-weight: bold">手机号码</p>-->
    <!--            <p style="color: #aaaaaa">17319395034</p>-->
    <!--            <p style="color: #aaaaaa">请绑定手机，安全登录全国中小企业招聘平台</p>-->
    <!--          </div>-->
    <!--        </div></el-col>-->
    <!--        <el-col :span="6"><div class="grid-content bg-purple">-->
    <!--          <router-link :to="{path:'/entUpdatePassword',query:{id:id}}">-->
    <!--            <el-button class="user_button">修改手机</el-button>-->
    <!--          </router-link>-->
    <!--        </div></el-col>-->
    <!--      </el-row>-->
    <!--    </div>-->
  </div>
</template>

<script>
import { entFind, getInfoByToken } from '@/api/enterprise'
export default {
  name: 'EntUser',
  filters: {
    statusFilter(status) {
      const statusMap = {
        '1': 'el-icon-success',
        '0': 'el-icon-warning',
        '2': 'el-icon-error'
      }
      return statusMap[status]
    },
    statusFormat(status) {
      const statusMap = {
        '1': '已审核',
        '0': '未审核',
        '2': '审核未通过'
      }
      return statusMap[status]
    },
    statusColor(status) {
      const statusMap = {
        '1': 'color:green',
        '0': 'color:orangered',
        '2': 'color:#aaaaaa'
      }
      return statusMap[status]
    }
  },
  data() {
    return {
      id: '',
      drawer: false,
      currentPage: 1,
      limit: 30,
      total: 0,
      currentPage1: 1,
      limit1: 30,
      total1: 0,
      list: [],
      list1: [],
      entId: '',
      entName: '',
      listLoading: true,
      formSearch: { entName: '',
        pagenow: '1' },
      formSearch1: { entName: '',
        pagenow: '1' },
      entUserForm: {
        id: '',
        enterpriseName: '',
        legalRepresentative: '',
        enterpriseContacts: '',
        enterpriseTel: '',
        enterpriseMail: '',
        enterpriseNatureName: '',
        industryName: '',
        industrySubName: '',
        provName: '',
        cityName: '',
        distName: '',
        enterpriseAddress: ''

      }
    }
  },
  created() {
    const that = this
    const sendData = { enterpriseName: that.formSearch.entName }
    entFind(sendData).then(response => {
      that.entUserForm = response.data
    })
  },
  methods: {
  }
}
</script>

<style scoped>
  .ent_button{
    cursor:pointer;
    outline:none;
    padding: 0 20px;
    margin-right: 16px;
    margin-bottom: 10px;
    display: inline-block;
    height: 26px;
    line-height: 24px;
    border-radius: 10px;
    border: 1px solid #60b2ff;
    font-size: 12px;
    font-weight: 700;
    color: #409EFF;
    background:  #ecf5ff;
  }
  .ent_button:hover{
    color: #FFFFFF;
    background:  #409EFF;
  }
  .basics{
    background: #fff;
    width: 935px;
    height: 250px;
    padding: 20px 40px 20px 40px;
    margin-bottom: 20px;
  }
  .pass{
    background: #fff;
    width: 935px;
    height: 220px;
    padding: 20px 40px 20px 40px;
    margin-bottom: 20px;
    overflow: hidden;
  }
  .user_icon {
    float: left;
    font-size: 30px;
    line-height: 100px;
    color: #ff776f;
    text-align: center;
    width: 80px;
  }
  .user_button{
    float: right;
    margin-top: 30px;
    color: #409EFF;
    background:  #ecf5ff;
    border-radius: 10px;
  }
  .user_button:hover{
    color: #FFFFFF;
    background:  #409EFF;
  }
  .entbasics .el-col{
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .entbasics span{
    font-size: 16px;
  }
  .entbasicstext{
    color: #5a5e66;
  }
  .listAgeTele{
    line-height: 30px;
  }
</style>
